//
//class Person{
//    def work(){
//        "working..."
//    }
//}
//
//Person.metaClass.methodMissing = {
//    String name, args ->
//        def plays = ['Tennis', 'VolleyBall', 'BasketBall']
//
//        System.out.println "MethodMissing called for $name"
//        def methodInList = plays.find{
//            it == name.split('play')[1]
//        }
//
//       if (methodInList){
//           def impl = {
//               java.lang.Object[] vargs ->
//                   "playing ${name.split('play')[1]}..."
//           }
//           Person.metaClass."$name" = impl
//           impl(args)
//       }else{
//           throw new MissingMethodException(name, Person.class, args)
//       }
//}
//
//jack = new Person()
//println jack.work()
//println jack.playTennis()
//println jack.playTennis()
//
//try{
//    jack.playPolitics()
//}catch (ex)
//{
//    println ex
//}
//
//
